<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<head>

<link rel="stylesheet" href="jquery-ui-1.8.18.custom/css/cupertino/jquery-ui-1.8.18.custom.css" type="text/css" media="screen" ></link>
    <link rel="stylesheet" href="styles.css" type="text/css" media="screen" ></link>
    <script type="text/javascript" src="jquery-ui-1.8.18.custom/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="jquery-ui-1.8.18.custom/js/jquery-ui-1.8.18.custom.min.js"></script>
    <script>
	    $(function() {
	    	$( "#accordion" ).accordion();
		});
	</script>
	<script type="text/javascript">
	    $(function() {
			$( "input:submit, a, button", ".center" ).button();
		});
	</script>
	<script>
		$(function() {
			$( "#dataInicio" ).datepicker({
				changeMonth: true,
				changeYear: true
			});
		});
	</script>
	<script>
		$(function() {
			$( "#dataFim" ).datepicker({
				changeMonth: true,
				changeYear: true
			});
		});
	</script>
<title>Dr ERP</title>

</head>
<body>

	<div class="head">
		<div class="usuario_log">
			Olá, 
			<a href="login.jsf" >Logout</a>
		</div>
	</div>
	<div>
		<div id="accordion" style="width:205px; heigth:100%; float:left">
			<h3><a href="#">Transferências</a></h3>
			<div>
				<a style="font-size: 16px" href="transferenciaEdit.jsf">Transferências</a>
				<a style="font-size: 16px" href="relatorioTransferencias.jsf">Relatórios</a>
			</div>
			<h3><a href="#">Planos de Saúde</a></h3>
			<div style="heigth:83px">
				<a style="font-size: 16px" href="crudPlanosSaude.jsf">Gerenciar Planos</a>
				<br></br>
				<a style="font-size: 16px" href="relatorioTransferencias.jsf">Tabela de Preços</a>
			</div>
		</div>	
		<div class="center">
			<h1>Relatório</h1>
			<div>
				<div>
					<h:form>
					<table>
						<tr>
							<td>Status: 
								<select>
									<option value="todas">Todas</option>
									<option value="aprovada">Aberta</option>
									<option value="recusada">Aceita</option>
									<option value="paga">Recusada</option>
									<option value="erro">Efetuada</option>
									<option value="erro">Erro</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>Tipo: 
								<select>
									<option value="todas">Todas</option>
									<option value="pagar">A pagar</option>
									<option value="receber">A receber</option>
								</select>
							</td>
						</tr>
						<tr>
							<td>Início:   <h:inputText id="dataInicio" label="Login" value="#{relatorioTransBean.relatorio.dateBeginString}"/>
							  Término:   <h:inputText id="dataFim" label="Login" value="#{relatorioTransBean.relatorio.dateEndString}"/></td>
						</tr>
						<tr>
							<td>Pagador:
								<h:inputText id="pagador" label="pagador" value="#{relatorioTransBean.relatorio.pagador}"/>
							</td>
						</tr>
						<tr>
							<td>Beneficiário:
								<h:inputText id="beneficiario" label="beneficiario" value="#{relatorioTransBean.relatorio.beneficiario}"/>
							</td>
						</tr>
						<tr>
							<td>Valor Mínimo:   <h:inputText id="valmin" label="Login" value="#{relatorioTransBean.relatorio.minValue}"/>
							  Valor Máximo:   <h:inputText id="valmax" label="Login" value="#{relatorioTransBean.relatorio.maxValue}"/></td>
						</tr>
					</table>
					<h:commandButton action="#{relatorioTransBean.searchTransferencias}" style="left:0px; margin-top:-25px;" class="ui-state-default ui-corner-all login_button"  value="Buscar" />
					</h:form>
				</div>
				<h:panelGroup rendered="#{relatorioTransBean.relatorio.numTransferencias > '0'}" >
						<h:form id="form" style="margin-top:55px;"> 
		
							<p:dataTable var="trans" value="#{relatorioTransBean.relatorio.transferencias}">
							
								<p:column id="valor" sortBy="#{trans.requisicao.beneficiario.valor}">
									<f:facet name="header">  
						                Valor
						            </f:facet>
						            #{trans.valor}
								</p:column>
							
								<p:column id="beneficiario" sortBy="#{trans.requisicao.beneficiario.nome}">
									<f:facet name="header">  
						                Beneficiario
						            </f:facet>
						            #{trans.requisicao.beneficiario.nome}
								</p:column>
								
								<p:column id="pagador" sortBy="#{trans.requisicao.pagador.nome}">
									<f:facet name="header">  
						                Pagador
						            </f:facet>
						            #{trans.requisicao.pagador.nome}
								</p:column>
								
								<p:column id="status" sortBy="#{trans.requisicao.pagador.nome}">
									<f:facet name="header">  
						                Status
						            </f:facet>
						            #{trans.requisicao.status}
								</p:column>
								
								<p:column id="dataRequisicao" sortBy="#{trans.requisicao.pagador.nome}">
									<f:facet name="header">  
						                Data Requisição
						            </f:facet>
						            #{trans.requisicao.dataRequisicaoMilis}
								</p:column>
								
								<p:column id="dataLimite" sortBy="#{trans.requisicao.pagador.nome}">
									<f:facet name="header">  
						                Data Limite
						            </f:facet>
						            #{trans.requisicao.dataLimiteMilis}
								</p:column>
							
							</p:dataTable>
						</h:form>
				</h:panelGroup>
			</div>
		</div>
	</div>

</body>
</html>